<template>
	<view>
		<view class="vod">
			<view v-for="item,index in vodList" :key="index">
				<u-row v-if="index%3==0">
					<u-col span="4" justify="between" v-for="i in 3" :key="i">
						<view v-if="(index+i) <=vodList.length">
							<view @click="click(vodList[index+i-1])">
								<image class="cover" :src="vodList[index+i-1].vodPic"></image>
								<view class="renew">{{vodList[index+i-1].vodRemarks}}</view>
								<view class="title">{{vodList[index+i-1].vodName}}</view>
							</view>
						</view>
					</u-col>
				</u-row>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			vodList: {}
		},
		data() {
			return {}
		},
		methods: {
			click(item) {
				if(uni.getStorageSync('playerSet') == 1){
					uni.$u.route({
						url: 'pages/dplayer/dplayer',
						params: {
						vodInfo: encodeURIComponent(JSON.stringify(item))
						}
					})
				}else{
					uni.$u.route({
						url: 'pages/detail/detail',
						params: {
						vodInfo: encodeURIComponent(JSON.stringify(item))
						}
					})
				}
			}
		}
	}
</script>

<style scoped>
	.vod {
		margin-left: 10px;
	}

	.cover {
		width: calc(100% - 10px);
		height: 150px;
		border-radius: 5px;
		position: relative;
	}

	.renew {
		width: 100%;
		position: relative;
		z-index: 2;
		color: #FFFFFF;
		font-size: 10px;
		top: -30px;
		text-align: right;
		right: 20px;
		padding-left: 2px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		
	}

	.title {
		position: relative;
		padding-left: 5px;
		padding-right: 5px;
		font-size: 14px;
		top: -10px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
</style>
